local salt1 = "zuishan@taobao.com_head"
local salt2 = "zuishan@taobao.com_tail"
local app = ngx.var["ngx_http_tmd_module_apply"]
local ip = ngx.var["ngx_http_tmd_module_remote_ip"]
local time = ngx.time() + 300

local md5str = ngx.md5(salt1 .. app .. ip .. time .. salt2)

local value = app .. "|" .. ip .. "|" .. time .. "|" .. md5str

if ngx.var.request_method == "POST" then

   ngx.var.act = "<script>function t(){document.mainform.submit();}</script>"

else
   ngx.var.act = "<script>function t(){document.location.reload();}</script>"

end

ngx.var.sec = value
